package com.chw.common;

public class ChwData {
    private Integer code;
    private String msg;
    private Object data;
    public  static ChwData success(Object o){
        ChwData chwData =new ChwData();
        chwData.setCode(200);
        chwData.setMsg("处理成功");
        chwData.setData(o);
        return chwData;
    }
    public  static ChwData error(Integer code ,String msg){
        ChwData chwData =new ChwData();
        chwData.setCode(code);
        chwData.setMsg("处理失败:"+ msg);
        chwData.setData("");
        return chwData;
    }
    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
